import { get, post } from "../utils/request.js"


export function apiGetCourse(id){
	return get({url:"/core/course/getCourseById/"+id})
}


export function apiGetVideos(id){
	return get({url:"/core/video/getVideoByCourseId/"+id})
}

export function apiGetDescription(id){
	return get({url:"/core/courseDescription/getCourseDescription/"+id})
}

export function apiGetActive(id){
	return get({url:"/core/active/getActive/"+id})
}


export function apiCreateOrder(orderVo){
	return post({url:"/order/createOrder",data:orderVo})
}

export function apiCreateAliQr(order){
	return post({url:"/order/zhiFuBaoEasyPay",data:order})
}

export function apiQueryZFBPayStatus(orderNo){
	return get({url:"/order/queryZFBPayStatus/"+orderNo})
}

export function getSubject(pageNum,pageSize){
	return post({url:`/core/subject/findsubject/${pageNum}/${pageSize}`})
}
export function apiAddCourse(course){
	return post({url:"/core/course/addCourse",data:course})
}
export function apiUploadVideo(video){
	return post({url:"/core/video/uploadVideo",data:video})
}
export function apiUpdateCourse(course){
	return post({url:"/core/course/updateCourse",data:course})
}
export function updateCourseBuyCount(id){
	return get({url:"/core/course/updateCourseBuyCount/"+id})
}

export function updateCourseViewCount(id){
	return get({url:"/core/course/updateCourseViewCount/"+id})
}


export function apiAddCourseCollection(courseCollect){
	return post({url:"/core/courseCollection/addCourseCollection",data:courseCollect})
}

export function apiDeleteCourseCollection(courseCollectionVo){
	return post({url:"/core/courseCollection/deleteCourseCollection",data:courseCollectionVo})
}











